//City Class
//Holds informationn of the city for the game to display

//	-Variables:
//		-int immigrants
//		-int currStarved
//		-int totalStarved
//		-int population
//		-int acre
//		-int totalBushels
//		-int currentBushels
//		-int year
//		-int grain eaten
//		-int cost per acre
#pragma once
#include <cstdlib>
#include <iostream>
#include <ctime>
#include <sstream>
#include <fstream>

enum inputState { NONE, PURCHASE, FEED, PLANT, SUBMIT, QUIT, WIN, LOSE } ;

using namespace std;

class City
{
private:
	//variables for displaying each year update
	int m_immigrants;
	int m_currStarved;
	int m_currentBushels;
	int m_grainEaten;
	int m_costPerAcre;
	int m_harvested;
	bool m_plague;

	//variables kept throughout the game
	int m_totalStarved;
	int m_population;
	int m_acre;
	int m_totalBushels;
	int m_year;

	int m_percentPopDied;
	int m_acresPrePerson;
	int m_rulerPerformance;

	//temporary variables used to calculate the difference
	int m_tempPurchase ;
	int m_tempFeed ;
	int m_tempPlant ;

	//used in Display..()
	char num[10], txt[512];//buffers to hold text
	string msg;//message to return for displaying


public:
	City();
	~City();

	//values recieved from game to update the current values for the year
	void UpdateCity(bool plag, int a_imm, int a_starved, int a_grainEaten, int a_grainHarvested, int a_acre, int a_planted);

	// Clears screen, Displays data for current year.
	string Display();

	int GetPop()		{	return m_population;	}
	int GetBushels()	{	return m_currentBushels;	}
	int GetCost()		{	return m_costPerAcre;	}
	int GetAcres()		{	return m_acre;	}
	int GetYears()		{	return m_year;	}
	int GetStarved()	{	return m_currStarved;	}

	//validates input from user, takes in the amount entered and the option chosen
	bool GetValidation(int input, int option);
	string DisplayEnd();
	string DisplayLose();
};
